<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/static/jQuery-1.11/jquery-1.11.3.min.js"></script>
</head>
<body>
    <button id="btn1">btn1</button>
    <button id="btn2" class="myBtn">btn2</button>
    <button id="btn3" class="myBtn">btn3</button>
    <script>
        $('#btn1').click(function () { // 函数在触发点击事件的时候就会执行这个函数
            console.log(this); // 被点击的按钮，事件源，DOM 对象
            console.log($(this)); //
            console.log('今天天气挺好');
        });

        $('.myBtn').click(function () {
            console.log(this);
            console.log('今天适合出去玩');
        });

        window.onload = function () {
            console.log(1);
        };
        window.onload = function () {
            console.log(2);
        };
    </script>
</body>
</html>